package test
import scala.math;
object YieldFor {
  def main(args: Array[String]): Unit = {

    //for返回的不止一个值
    var y=for(i:Int<-1 to 199;if i%7==0) yield i;
    //类似迭代器Iterator
    println(y.getClass)
    for(a<-y){
      print(s"$a\t")
    }
    //print(y)
  }
}
